package nc.ui.ic.bc.supply;

import nc.ui.pub.ClientEnvironment;
import nc.ui.pub.bill.BillEditEvent;
import nc.ui.trade.bill.AbstractManageController;
import nc.ui.trade.manage.ManageEventHandler;
import nc.ui.zmpub.pub.bill.DefBillManageUI;
import nc.vo.ic.bc.supply.CheckClassInterface;
import nc.vo.pub.CircularlyAccessibleValueObject;
public class ClientUI extends DefBillManageUI{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	protected AbstractManageController createController() {
		
		return new Controller();
	}

	@Override
	public void setBodySpecialData(CircularlyAccessibleValueObject[] vos)
			throws Exception {
		
		
	}

	@Override
	protected ManageEventHandler createEventHandler() {
	
		return new EventHandler(this,getUIControl());
		}

	@Override
	protected void setHeadSpecialData(CircularlyAccessibleValueObject vo,
			int intRow) throws Exception {
		
		
	}

	@Override
	protected void setTotalHeadSpecialData(CircularlyAccessibleValueObject[] vos)
			throws Exception {
		
		
	}

	@Override
	protected void initSelfData() {
		
	}

	@Override
	public void setDefaultData() throws Exception {
		
		getBillCardPanel().getHeadItem("pk_corp").setValue(
				ClientEnvironment.getInstance().getCorporation().getPrimaryKey());
		getBillCardPanel().getHeadItem("voperatorid").setValue(
				ClientEnvironment.getInstance().getUser().getPrimaryKey());
	}
	
	public java.lang.Object getUserObject() {
		return new CheckClassInterface();
	}

	@Override
	public boolean isLinkQueryEnable() {
		
		return false;
	}

	@Override
	public void afterEdit(BillEditEvent e) {
		super.afterEdit(e);
		String sItemKey = e.getKey();
		if(sItemKey.equals("suppliermanid")){
			getBillCardPanel().execHeadEditFormulas();
		}
	}


	

}
